package com.study01;

public class TestDemo {

    public static void showEachHouse(Father f){
        f.showHouse();
    }

    public static void main(String[] args) {
        // 父类类名 变量名 = new 子类类名();
//        Father s1 = new Son();
//        s1.showName();
//
//        Father d1 = new Daughter();
//        d1.showName();

        System.out.println("-------------------????????????????????????--------------------");
        Son s1 = new Son();
        Daughter d1 = new Daughter();

        s1.showHouse();
        d1.showHouse();
//
        showEachHouse(s1);
        showEachHouse(d1);

    }
}
